import Vue from 'vue'
import App from './App.vue'

//引入全局注册组件
import NavType from '@comp/NavType'
import Swiper from '@comp/Swiper'
import Pagenation from '@comp/Pagenation'

import router from './router'
import store from '@/store'

//引入mockServer,使用mockjs模拟
import '@/mock/mockServer.js'

Vue.config.productionTip = false

//注册全局组件
Vue.component('NavType',NavType)
Vue.component('Swiper',Swiper)
Vue.component('Pagenation',Pagenation)

new Vue({
  render: h => h(App),
  router,
  store,
  //创建事件总线，不能在mounted中，参考父子组件生命周期
  beforeCreate(){
    Vue.prototype.$bus = this
  }
}).$mount('#app')

